import React,{Component} from 'react';
import axios from 'axios'

export default class Login extends Component{
    state={
        user:'',
        pass:'',
        bannerList:[1,2,3]
    };

    componentDidMount(){

    }
    passChange = (e) => {
        const {pass} = this.state;
        let pass1= e.target.value;
        this.setState({pass:pass1})
    }
    submit = () => {
        console.log(this.input01);

    }
    render() {
        const{bannerList} = this.state;
        return(
            <div>
                <div>login
                    <ul>
                       <li>123</li>

                    </ul>
                </div>
                <div>
                    <div>用户名：</div>
                    <input type="text" ref={val => this.userInput = val}/>
                    <div>密码：</div>
                    <input type="password" value={this.state.pass} onChange={this.passChange}/>
                    <div onClick={this.submit}>登陆</div>
                    <input type="text" ref={val => this.input01 = val}/>
                </div>
            </div>
        )
    }
}